import { IFeidaoAiNodejsComponent } from '@dfeidao/atom-nodejs/interfaces';
import nodejs from '@dfeidao/atom-nodejs/msg/nodejs';
import render from '@dfeidao/atom-nodejs/render/render';
import p001 from './p001';

export default async function na001(fd: IFeidaoAiNodejsComponent) {// 初始化渲染
	// todo
	console.log('zj-000003:na001------start');

	const page_no = fd.data.params['page-no'] as string || '1';// 获取当前页码

	const res = await nodejs(fd.data.actionid, fd.data.sessionid, 'wyf-hManager/zj-000003/s001', {
		filter: {
			hidden_name: '',
			pn: Number(page_no)
		}
	});
	console.log(res);
	render(fd.data.node, res, p001, 'p001');
	console.log('zj-000003:na001------end');
}
